/*
 * Copyright 2023 LINE Corporation
 *
 * LINE Corporation licenses this file to you under the Apache License,
 * version 2.0 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech Do not edit the class manually.
 */
package com.linecorp.bot.audience.model;



import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Audience group job
 *
 * @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-audience-group">
 *     Documentation</a>
 */
@JsonInclude(Include.NON_NULL)
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
public record AudienceGroupJob(
    /** A job ID. */
    @JsonProperty("audienceGroupJobId") Long audienceGroupJobId,
    /** An audience ID. */
    @JsonProperty("audienceGroupId") Long audienceGroupId,
    /** The job&#39;s description. */
    @JsonProperty("description") String description,
    /** Get type */
    @JsonProperty("type") AudienceGroupJobType type,
    /** Get jobStatus */
    @JsonProperty("jobStatus") AudienceGroupJobStatus jobStatus,
    /** Get failedType */
    @JsonProperty("failedType") AudienceGroupJobFailedType failedType,
    /** The number of accounts (recipients) that were added or removed. */
    @JsonProperty("audienceCount") Long audienceCount,
    /** When the job was created (in UNIX time). */
    @JsonProperty("created") Long created) {

  public static class Builder {
    private Long audienceGroupJobId;
    private Long audienceGroupId;
    private String description;
    private AudienceGroupJobType type;
    private AudienceGroupJobStatus jobStatus;
    private AudienceGroupJobFailedType failedType;
    private Long audienceCount;
    private Long created;

    public Builder() {}

    public Builder audienceGroupJobId(Long audienceGroupJobId) {
      this.audienceGroupJobId = audienceGroupJobId;
      return this;
    }

    public Builder audienceGroupId(Long audienceGroupId) {
      this.audienceGroupId = audienceGroupId;
      return this;
    }

    public Builder description(String description) {
      this.description = description;
      return this;
    }

    public Builder type(AudienceGroupJobType type) {
      this.type = type;
      return this;
    }

    public Builder jobStatus(AudienceGroupJobStatus jobStatus) {
      this.jobStatus = jobStatus;
      return this;
    }

    public Builder failedType(AudienceGroupJobFailedType failedType) {
      this.failedType = failedType;
      return this;
    }

    public Builder audienceCount(Long audienceCount) {
      this.audienceCount = audienceCount;
      return this;
    }

    public Builder created(Long created) {
      this.created = created;
      return this;
    }

    public AudienceGroupJob build() {
      return new AudienceGroupJob(
          audienceGroupJobId,
          audienceGroupId,
          description,
          type,
          jobStatus,
          failedType,
          audienceCount,
          created);
    }
  }
}
